/*
 * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef OHOS_DSCREEN_ERRCODE_H
#define OHOS_DSCREEN_ERRCODE_H

namespace OHOS {
namespace DistributedHardware {
enum DScreenErrorCode {
    DH_SUCCESS = 0,
    DSCREEN_INIT_ERR = -1,
    DSCREEN_BAD_VALUE = -2,
    // SA error code
    ERR_DH_SCREEN_SA_GET_SAMGR_FAIL = -50000,
    ERR_DH_SCREEN_SA_GET_SOURCESERVICE_FAIL = -50001,
    ERR_DH_SCREEN_SA_GET_SOURCEPROXY_FAIL = -50002,
    ERR_DH_SCREEN_SA_GET_SOURCECALLBACKPROXY_FAIL = -50003,
    ERR_DH_SCREEN_SA_SOURCEPROXY_NOT_INIT = -50004,
    ERR_DH_SCREEN_SA_SOURCEPCALLBACK_NOT_INIT = -50005,
    ERR_DH_SCREEN_SA_GET_SINKSERVICE_FAIL = -50006,
    ERR_DH_SCREEN_SA_GET_SINKPROXY_FAIL = -50007,
    ERR_DH_SCREEN_SA_SINKPROXY_NOT_INIT = -50008,
    ERR_DH_SCREEN_SA_REGISTERCALLBACK_NOT_FOUND = -50009,
    ERR_DH_SCREEN_SA_UNREGISTERCALLBACK_NOT_FOUND = -50010,
    ERR_DH_SCREEN_SA_REQUEST_CODE_INVALID = -50011,
    ERR_DH_SCREEN_SA_WRITEINTERFACETOKEN_FAILED = -50012,
    ERR_DH_SCREEN_SA_WRITEPARAM_FAILED = -50013,
    ERR_DH_SCREEN_SA_READPARAM_FAILED = -50014,
    ERR_DH_SCREEN_SA_DSCREENMGR_NOT_INIT = -50015,
    ERR_DH_SCREEN_SA_ENABLE_FAILED = -50016,
    ERR_DH_SCREEN_SA_DISABLE_FAILED = -50017,
    ERR_DH_SCREEN_SA_SOURCETRANS_NOT_INIT = -50018,
    ERR_DH_SCREEN_SA_SCREENREGIONMGR_NOT_INIT = -50019,
    ERR_DH_SCREEN_SA_SINKTRANS_NOT_INIT = -50020,
    ERR_DH_SCREEN_SA_GET_REMOTE_SOURCE_SERVICE_FAIL = -50021,
    ERR_DH_SCREEN_SA_GET_REMOTE_SINK_SERVICE_FAIL = -50022,
    ERR_DH_SCREEN_SA_SCREENREGION_SETUP_FAIL = -50023,
    ERR_DH_SCREEN_SA_SCREENREGION_START_FAIL = -50024,
    ERR_DH_SCREEN_SA_REMOVE_VIRTUALSCREEN_FAIL = -50025,
    ERR_DH_SCREEN_SA_DSCREEN_TASK_NOT_VALID = -50026,
    ERR_DH_SCREEN_SA_DSCREEN_SCREENGION_SETUP_FAILED = -50027,
    ERR_DH_SCREEN_SA_INVALID_IPC_CALL = -50028,
    ERR_DH_SCREEN_SA_REGISTER_SCREENLISTENER_FAIL = -500029,
    ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL = -500030,
    ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL = -500031,
    ERR_DH_SCREEN_SA_LOAD_TIMEOUT = -500032,
    ERR_DH_SCREEN_SA_HIDUMPER_ERROR = -500033,
    ERR_DH_SCREEN_SA_ENABLE_JSON_ERROR = -500034,
    ERR_DH_SCREEN_SA_VALUE_NOT_INIT = -500035,
    ERR_DH_SCREEN_SA_DSCREEN_SETUP_FAILED = -500036,
    ERR_DH_SCREEN_SA_SET_IMAGESURFACE_FAIL = -500037,
    ERR_DH_SCREEN_SA_INIT_SOURCE_FAIL = -500038,
    ERR_DH_SCREEN_SA_CHECK_ENABLE_PERMISSION_FAIL = -500039,
    // Transport component error code
    ERR_DH_SCREEN_TRANS_ERROR = -51000,
    ERR_DH_SCREEN_TRANS_TIMEOUT = -51001,
    ERR_DH_SCREEN_TRANS_NULL_VALUE = -51002,
    ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM = -51003,
    ERR_DH_SCREEN_TRANS_ILLEGAL_OPERATION = -51004,
    ERR_DH_SCREEN_TRANS_SESSION_CLOSED = -51005,
    ERR_DH_SCREEN_TRANS_CREATE_CODEC_FAILED = -51006,
    ERR_DH_SCREEN_TRANS_RELEASE_CODEC_FAILED = -51007,
    ERR_DH_SCREEN_TRANS_START_CODEC_FAILED = -51008,
    ERR_DH_SCREEN_TRANS_STOP_CODEC_FAILED = -51009,
    ERR_DH_SCREEN_TRANS_CREATE_SURFACE_FAILED = -51010,
    ERR_DH_SCREEN_TRANS_SESSION_NOT_OPEN = -51011,
    // adapter
    ERR_DH_SCREEN_ADAPTER_SESSION_ID_NOT_FIND = -52000,
    ERR_DH_SCREEN_ADAPTER_UNREGISTER_SOFTBUS_LISTENER_FAIL = -52001,
    ERR_DH_SCREEN_ADAPTER_REGISTER_SOFTBUS_LISTENER_FAIL = -52002,
    ERR_DH_SCREEN_ADAPTER_FIND_SOFTBUS_LISTENER_FAIL = -52003,
    ERR_DH_SCREEN_ADAPTER_BAD_VALUE = -52004,
    ERR_DH_SCREEN_ADAPTER_OPEN_SESSION_FAIL = -52005,
    ERR_DH_SCREEN_ADAPTER_PARA_ERROR = -52006,
    // Encoder & Decoder
    ERR_DH_SCREEN_CODEC_RELEASE_FAILED = -53000,
    ERR_DH_SCREEN_CODEC_PREPARE_FAILED = -53001,
    ERR_DH_SCREEN_CODEC_START_FAILED = -53002,
    ERR_DH_SCREEN_CODEC_FLUSH_FAILED = -53003,
    ERR_DH_SCREEN_CODEC_STOP_FAILED = -53004,
    ERR_DH_SCREEN_CODEC_SET_CALLBACK_FAILED = -53005,
    ERR_DH_SCREEN_CODEC_CONFIGURE_FAILED = -53006,
    ERR_DH_SCREEN_CODEC_SURFACE_ERROR = -53007,
    ERR_DH_SCREEN_CODEC_PARTAIL_DATA_ERROR = -53008,
    // ScreenClient error code
    ERR_DH_SCREEN_SCREENCLIENT_SHOW_WINDOW_ERROR = -54000,
    ERR_DH_SCREEN_SCREENCLIENT_REMOVE_WINDOW_ERROR = -54001,
    ERR_DH_SCREEN_SCREENCLIENT_ADD_WINDOW_ERROR = -54002,
    ERR_DH_SCREEN_SCREENCLIENT_MOVE_WINDOW_ERROR = -54003,
    ERR_DH_SCREEN_SCREENCLIENT_HIDE_WINDOW_ERROR = -54004,
    // screen register callback
    ERR_DH_SCREEN_REGISTER_CALLBACK_NOT_INIT = -55000,
    // screen string param empty or screen input param invalid
    ERR_DH_SCREEN_STRING_PARAM_EMPTY = -56000,
    ERR_DH_SCREEN_INPUT_PARAM_INVALID = -56001,
    ERR_DH_SCREEN_DATA_TYPE_INVALID = -56002,
    // screen surface error
    ERR_DH_SCREEN_SURFACE_REQUEST_FAILED = -57000,
    ERR_DH_SCREEN_SURFACE_BUFFER_INVALIED = -57001,
    ERR_DH_SCREEN_SURFACE_FLUSH_FAILED = -57002,
    ERR_DH_SCREEN_SURFACE_INVALIED = -57003,
    // AV Transport component error code
    ERR_DH_AV_TRANS_NULL_VALUE = -58000,
    ERR_DH_AV_TRANS_ILLEGAL_PARAM = -58001,
    ERR_DH_AV_TRANS_TIMEOUT = -58002,
    ERR_DH_AV_TRANS_LOAD_ERROR = -58003,
    ERR_DH_AV_TRANS_INIT_FAILED = -58004,
    ERR_DH_AV_TRANS_CREATE_CHANNEL_FAILED = -58005,
    ERR_DH_AV_TRANS_SETUP_FAILED = -58006,
    ERR_DH_AV_TRANS_START_FAILED = -58007,
    ERR_DH_AV_TRANS_STOP_FAILED = -58008,
    ERR_DH_AV_TRANS_FEED_DATA_FAILED = -58009,
    ERR_DH_AV_TRANS_SEND_MSG_FAILED = -58010,
    ERR_DH_AV_TRANS_SINK_START_FAILED = -58011,
};
} // namespace DistributedHardware
} // namespace OHOS
#endif